package com.bjc2.singleton.demo3;

/**
 * @program: DesignPattern
 * @description: 懒汉式-线程不安全
 * @author: bjc
 * @create: 2022-03-29 20:38
 */
public class Singleton {

    private Singleton(){}

    private static Singleton instance;

    public static Singleton getInstance(){
        if (instance == null) {
            instance = new Singleton();
        }
        return instance;
    }
}
